﻿<%@ Control Language="C#" Inherits="Web.Control.WWW.Wiki.Contribution" %>
<asp:Literal ID="lLCount" Text="5" runat="server" Visible="false" />
<asp:Literal ID="lMCount" Text="5" runat="server" Visible="false" />
<asp:Literal ID="lNCount" Text="5" runat="server" Visible="false" />
<asp:Literal ID="lOCount" Text="5" runat="server" Visible="false" />
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1><%=Title%></h1>
								<div class="copyright"><a href="/"><%=GetText("M0001")%></a> > <a href="/knowledge"><%=GetText("WK063")%></a> > <a href="/knowledge/learn-<%=Learn%>-<%=BaseL%>.htm"><%=GetText("C0105",new string[]{GetLanguageText(Learn)})%> <%=GetText("C2019",new string[]{GetLanguageText(BaseL)})%></a> > <a href="/knowledge/contributionlist-<%=Learn%>-<%=BaseL%>-1-[sl].htm"><%=GetText("WK054")%></a></div>
							</div>
							<div class="submenuN_button" style="top:25"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%><a href="/knowledge/edit.htm" class="Naddbtn btnspec" style="text-decoration:none"><%}else{ %><a href="#" onclick="NotAffirm()" class="Naddbtn btnspec" style="text-decoration:none"><%} %><span><%=GetText("WK004")%></span></a></div>
						</div>
					</div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Right">
						<div class="Center9001Content">
							<div class="knowedge_area">
								<div><%=Regex.Replace(formattedContent, "<img ", "<img onload='setImgSize(this,500,0);' ")%></div>
								<div>
									<div class="pink18 floatl"><%=GetText("WK049", new string[] { HttpUtility.HtmlEncode(Title) })%></div>
									<div class="floatr"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%> <a href="/knowledge/edit.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("C0053")%>"><img src="/Images/icon_common_edit.gif" align="absmiddle" border="0" /></a> <a href="/knowledge/edit.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("C0053")%>"><%=GetText("C0053")%></a><%}else{ %><a href="#" onclick="NotAffirm()" title="<%=GetText("C0053")%>"><img src="/Images/icon_common_edit.gif" align="absmiddle" border="0" /></a> <a href="#" onclick="NotAffirm()" title="<%=GetText("C0053")%>"><%=GetText("C0053")%></a><%} %></div>
									<div class="clear"></div>
								</div>
								<!--content area-->
								<div class="wiki_content_tag">
									<%foreach (Model.WWW_WWW.Wiki.CategoryInfo cat in cate){%>
									<a href="/knowledge/selecttags-1-<%=Learn%>-<%=BaseL%>-<%=HttpUtility.UrlEncode(cat.Name) %>.htm"><%=HttpUtility.HtmlEncode(cat.Name)%></a>&nbsp;&nbsp;
									<%} %>
								</div>
								<!--content end-->
								<div class="margin20T">
									<h3><%=GetText("C0111")%></h3>
									<!--content area-->
									<div class="margin20">
										<div id="divComment">
											<asp:Repeater ID="rptN" runat="server">
												<ItemTemplate>
													<div class="wiki_comment">
														<div class="wiki_comment_avatar Pic50" align="center"><a class="photo_50" href="/<%#Eval("Username") %>.htm"><%#Eval("Avatar").ToString() == "" ? "<img src=\"/Images/No_pic.gif\" />" : Eval("Avatar", "<img src=\"{0}\" />").ToString()%></a></div>
														<div class="wiki_comment_Bacontent">
															<div class="wiki_comment_acontent"><a href='/<%#Eval("Username") %>.htm'><%#HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a> <span class="grey10"><%#FormatDiffDate(GetText("C0036"), Model.CommonMethod.FormatDateAgo((DateTime)Eval("DateTime")))%></span><div class="margin5"><%#EncodeMessage(Eval("Body").ToString())%></div>
															</div>
															<%#DeleteFlag?Eval("ID", @"<div class='wiki_comment_delete'><span onclick='DeleteComent({0},this)'><a href='javascript:void(0);'><img src='/Images/icon_comment_delete.gif' border='0'></a></span></div>").ToString():"" %>
															<div class="Clear"></div>
														</div>
														<div class="Clear"></div>
													</div>
												</ItemTemplate>
											</asp:Repeater>
											<%if (rptN.Items.Count == 0){%>
											<%} %>
										</div>
											<%if (rptN.Items.Count > 0){%>
										<p align="right"><a href="/knowledge/comment-1-<%=HttpUtility.UrlEncode(Request["n"])%>.htm"><%=GetText("WK037", new string[] { HttpUtility.HtmlEncode(Title) })%></a></p>
										<%} %>
									</div>
										<div class="margin10">
											<span class="black16b"><%=GetText("WK036", new string[] { HttpUtility.HtmlEncode(Title) })%></span>
											<p><textarea id="txtComment" rows="5" class="common100D"></textarea></p>
											<div class="margin5"><input id="btnSave" value="<%=GetText("WK152")%>" class="button" type="button" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"Save()\"":"onclick=\"NotAffirm()\""%> /></div>
										</div>
									<!--content end-->
									<!--add comment-->
									<!--add comment end-->
								</div>
							</div>
						</div>
					</div>
					<div class="Center9001Left">
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("WK081")%></h4>
								<div class="layer_contentA5" style="margin-bottom:20px">
									<div class="pic50 floatl wid65"><a class="photo_50" title="<%=HttpUtility.HtmlAttributeEncode(Creator.NickName)%>" href="/<%=Creator.Username %>.htm"><%=(Creator.Image == "" ? "<img src=\"/Images/No_pic.gif\" />" : string.Format("<img src=\"{0}\" />", Creator.Image))%></a></div>
									<div class="floatr wid120"><img src='/Images/<%=(Creator.Online? "Online" : "Offline" )%>.gif' title='<%=(Creator.Online?GetText("C0038"):GetText("C0039"))%>' /> <a href='/<%=Creator.Username%>.htm'><%=Creator.NickName%></a><br /><%=Creator.NL %>, <%=GetText("C0102",new string[]{GetCountryText(Creator.GJ)})%><br /><span class="orange10"><%=(Creator.Gender=="0"?GetText("C0013"):GetText("C0012"))%></span></div>
									<div class="clear">
									</div>
								</div>
								<h4><%=GetText("WK043")%></h4>
								<div class="layer_contentA5">
									<asp:Repeater ID="rptO" runat="server">
										<ItemTemplate>
								<%if (Page.User.Identity.Name == Creator.Username)
								{ %>
								<strong><%#Eval("NickName") %></strong><br />
								<%}else if(Page.User.Identity.Name!=""){ %>
								<a href="/<%#Eval("Username") %>.htm"><%#HttpUtility.HtmlEncode(Eval("NickName").ToString())%></a><br />
								<%} %>
											
										</ItemTemplate>
									</asp:Repeater>
								</div>
								<div class="layer_contentA5" style="text-align:right">
								<%if (Page.User.Identity.Name == Creator.Username)
								  {%>
									<a href="/knowledge/manageEditors-<%=Request["n"]%>.htm"><%=GetText("WK134")%></a>
								<%}
								  else
								  { %>
									<a href="/knowledge/editors-<%=Request["n"]%>.htm"><%=GetText("WK134")%></a>
								<%} %>
								</div>
								
								<% if (Page.User.Identity.Name != "" && Page.User.Identity.Name != Creator.Username && !IsRequest)
								   { %>
								<div style="border-top: 1px #ccc solid; padding-top: 5px"><img src="/Images/icon_common_add.gif" align="absmiddle" /> <span id="RequestEdit" <%=(((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm)?"onclick=\"RequestEdit()\"":"onclick=\"NotAffirm()\""%>><a href="javascript:void(0);"><%=GetText("WK045")%></a></span>
								</div>
								<%} %>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4><%=GetText("WK030")%></h4>
								<div class="layer_contentA5">
										<p><%if (BLF.StaticData.HaveLanguageImage(Learn)){ %>
										<img src="/Images/language_<%=Learn%>.gif" align="absmiddle" />
										<%} %>
										<%=GetText("C0105",new string[]{GetLanguageText(Learn)})%><br />
										<%if (BLF.StaticData.HaveLanguageImage(BaseL)){ %>
										<img src="/Images/language_<%=BaseL%>.gif" align="absmiddle" />
										<%} %>
										<%=GetText("C2019",new string[]{GetLanguageText(BaseL)})%></p>
										<p><strong><span id="RFen">
											<%=Rate.ToString("N2")%>
										</span> <%=GetText("WK098")%></strong> (<span id="RRen"><%=SumVote%></span> <%=GetText("WK096")%>)
										<br />
										<div id="ThaiRating" onmouseout="RateOut()">
											<%for (int i = 0; i < Math.Round(Rate, 0); i++)
											  {%>
											<span id="ThaiRating_Star_<%=(i+1)%>" onmouseover="RateOver(<%=(i+1)%>)" onclick="RateClick(<%=(i+1)%>)" class="ratingStar filledRatingStar" style="float: left;">&nbsp;</span>
											<%} %>
											<%for (int i = (int)Math.Round(Rate, 0); i < 5; i++)
											  { %>
											<span id="ThaiRating_Star_<%=(i+1)%>" onmouseover="RateOver(<%=(i+1)%>)" onclick="RateClick(<%=(i+1)%>)" class="ratingStar emptyRatingStar" style="float: left;">&nbsp;</span>
											<%} %>
										</div><br />
										<strong><span id="viewCount"><%=ViewCount%></span> <%=GetText("WK097")%></strong></p>
								</div>
								<div class="margin5"><a href="/knowledge/comment-1-<%=HttpUtility.UrlEncode(Request["n"])%>.htm" title="<%=GetText("C0111")%>"><img src="/Images/icon_common_comment.gif" align="absmiddle" border="0" /></a> <a href="/knowledge/comment-1-<%=HttpUtility.UrlEncode(Request["n"])%>.htm" title="<%=GetText("C0111")%>"><%=GetText("C0111")%><span id="commentCount" dir="ltr">(<%=RecordCount%>)</span></a></div>
								<div class="margin5"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%><a href="/knowledge/edit.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("C0053")%>"><img src="/Images/icon_common_edit.gif" align="absmiddle" border="0" /></a> <a href="/knowledge/edit.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("C0053")%>"><%=GetText("C0053")%></a><%}else{ %><a href="#" onclick="NotAffirm()" title="<%=GetText("C0053")%>"><img src="/Images/icon_common_edit.gif" align="absmiddle" border="0" /></a> <a href="#" onclick="NotAffirm()" title="<%=GetText("C0053")%>"><%=GetText("C0053")%></a><%} %></div>
								<div class="margin5"><a href="/knowledge/history.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("WK031")%>"><img src="/Images/icon_wiki_history.gif" align="absmiddle" border="0" /></a> <a href="/knowledge/history.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("WK031")%>"><%=GetText("WK031")%></a></div>
								<div class="margin5"><a href="#" onclick="$Feedback$()" title="<%=GetText("WK034")%>"><img src="/Images/icon_common_flag.gif" align="absmiddle" border="0" /></a> <a href="#" onclick="$Feedback$()" title="<%=GetText("WK034")%>"><%=GetText("WK034")%></a></div>
								<div class="margin5"><a href="/knowledge/print.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("WK033")%>" target="_blank"><img src="/Images/icon_print.gif" align="absmiddle" border="0" /></a> <a href="/knowledge/print.htm?page=<%=HttpUtility.UrlEncode(Request["n"])%>" title="<%=GetText("WK033")%>" target="_blank"><%=GetText("WK033")%></a></div>
								<div class="margin5">

									<script type="text/javascript">
				addthis_url = window.location.href;  
				addthis_title = "italki language exchange and learning community"; 
				addthis_pub = "italki.com";
				//document.getElementById("shareUrl").value = addthis_url;
									</script>

									<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12"></script>

								</div>
							</div>
						</div>
						<div class="right_layerA">
						<%if (rptL.Items.Count > 0)
										  {%>
							<div class="layer_contentA">
								<h4><%=GetText("WK046")%></h4>
								<div class="layer_contentA5">
									<ul class="right_wiki_list">
										<asp:Repeater ID="rptL" runat="server">
											<ItemTemplate>
												<li><a href='/knowledge/contribution-<%#HttpUtility.UrlEncode(Eval("Name").ToString())%>.htm'><%#HttpUtility.HtmlEncode(Eval("Title").ToString())%></a></li>
											</ItemTemplate>
										</asp:Repeater>
									</ul>
								<p align="right"><a href="/knowledge/contributionlist.htm"><%=GetText("C0040")%></a></p>
								</div>
							</div>
							<%} %>
						</div>
						<div class="right_layerA">
						<%if (rptM.Items.Count > 0)
						{%>
							<div class="layer_contentC">
								<h4><%=GetText("WK048")%></h4>
								<div class="layer_contentA5">
									<ul class="right_wiki_list">
										<asp:Repeater ID="rptM" runat="server">
											<ItemTemplate>
												<li><a href='/knowledge/contribution-<%#HttpUtility.UrlEncode(Eval("Name").ToString())%>.htm'><%#HttpUtility.HtmlEncode(Eval("Title").ToString())%></a></li>
											</ItemTemplate>
										</asp:Repeater>
									</ul>
								<p align="right"><a href="/knowledge/contributionlist.htm"><%=GetText("C0040")%></a></p>
								</div>
							</div>
						<%} %>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA"><img src="/Images/icon_tips.gif" align="absmiddle" /> <strong><a href="/knowledge/wiki-How+to+edit+the+italki+wiki1.htm">How do I edit italki wiki?</a></strong>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<div id="commentItem" style="display: none;">
	<div class="wiki_comment">
		<div class="wiki_comment_avatar Pic50" align="center"><a class="photo_50" href="/$UserName$.htm">$Avatar$ </a></div>
		<div class="wiki_comment_Bacontent">
			<div class="wiki_comment_acontent">
				<span class="grey10"><a href='/$UserName$.htm'>$NickName$</a> $CreateDate$ </span>
				<p>$Body$</p>
			</div>
			$DeleteTool$
			<div class="Clear"></div>
		</div>
		<div class="Clear"></div>
	</div>
</div>
<div id="DeleteTool" style="display: none;">
	<div class='wiki_comment_delete'>
		<span onclick="DeleteComent('{0}',this)"><a href='javascript:void(0);'>
			<img src='/Images/icon_comment_delete.gif' border='0'></a></span></div>
</div>
<script>
var m = '<%=HttpContext.Current.User.Identity.Name%>';
var gDateFormat = "<%=GetText("C0033")%>";
var gStrDate = "<%=GetText("C0034")%>";
var gDeleteFlag = <%=(DeleteFlag?"true":"false") %>;
var gPageSize = <%=lNCount.Text%>;
var gPageName = '<%=Escape(Request["n"])%>';
var gRequest = false;
var sRequest = "<%=GetText("WK051")%>";
var sRateValue = <%=(int)Math.Round(Rate, 0) %>;
var RateValue = sRateValue;
var tmp = sRateValue;
</script>
<script type="text/javascript" src="/knowledge/AddComment.js"></script>